from __future__ import absolute_import, division, print_function

import tensorflow.compat.v1 as tf


# Generate Integer Features.
def build_int64_feature(data):
    return tf.train.Feature(int64_list=tf.train.Int64List(value=[data]))


# Generate Float Features.
def build_float_feature(data):
    return tf.train.Feature(float_list=tf.train.FloatList(value=[data]))


# Generate String Features.
def build_bytes_feature(data):
    return tf.train.Feature(bytes_list=tf.train.BytesList(value=[data]))


def build_example(feature):
    return tf.train.Example(features=tf.train.Features(feature=feature))
